import 'package:flutter/material.dart';

class NotifyItem extends StatefulWidget {
  const NotifyItem({Key? key, required this.item}) : super(key: key);
  final Map item;

  @override
  NotifyItemState createState() => NotifyItemState();
}

class NotifyItemState extends State<NotifyItem> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.all(10),
      padding: const EdgeInsets.all(10),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(10),
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            widget.item['title'],
            textAlign: TextAlign.left,
            style: const TextStyle(
              fontSize: 18,
              fontWeight: FontWeight.bold,
              color: Colors.black,
            ),
          ),
          const SizedBox(height: 10),
          Text(
            widget.item['content'],
            textAlign: TextAlign.left,
            style: const TextStyle(
              fontSize: 14,
              fontWeight: FontWeight.normal,
              color: Color.fromARGB(255, 103, 101, 101),
            ),
          ),
          const SizedBox(height: 10),
          Text(
            widget.item["createAt"],
            textAlign: TextAlign.left,
            style: const TextStyle(
              fontSize: 14,
              color: Color.fromARGB(255, 202, 200, 200),
            ),
          ),
        ],
      ),
    );
  }
}
